package cn.wen.yinxiu.member.service;

import cn.wen.yinxiu.member.vo.GroupInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.wen.yinxiu.common.toolkit.PageUtils;
import cn.wen.yinxiu.member.entity.GroupEntity;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @ClassName: GroupService
 * @Author 小飞
 * @Email coderwen22@163.com
 * @Date 2023-05-21 22:19:26
 * @Description:
 */
public interface GroupService extends IService<GroupEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 通过窗口Id获取窗口信息
     * @param talkId
     * @return
     */
    GroupEntity queryTalkBoxById(Long talkId);

    /**
     * 通过用户Id获取所有群聊基本信息
     * @param userId
     * @return
     */
    List<GroupInfo> queryUserGroupList(Long userId);

    /**
     * 获取用户聊天对话框
     * @param userId
     * @return
     */
    List<Long> queryUserGroupsIdList(Long userId);

    /**
     * 退出群聊
     *
     * @param userId
     * @param groupId
     * @return
     */
    boolean exitGroup(Long userId, Long groupId);
}

